{#include file="aj/pageheader.html"#}
<script type="text/javascript" src="themes/aj/js/My97DatePicker/WdatePicker.js"></script>
<script>
      var editor;
			KindEditor.ready(function(K) {
				editor = K.create('textarea[id="content"]', {
					allowFileManager : true,
					pasteType : 2,
					newlineTag : this.value,
					// filterMode : true,
					urlType : 'domain'
				});
			});

</script>
<h1>
<span class="action-span1"><a href="#">修改文章</a> </span>
<span class="action-span"><a href="{#spUrl c=article a=index pid=$smarty.get.pid#}">文章列表</a></span>
</h1>
<div class="main-div">
<form method="post" action="{#spUrl c=article a=update#}" name="theForm"  onsubmit="return validate()" enctype="multipart/form-data">
<table cellspacing="1" cellpadding="3" width="100%">

  <tr>
    <td class="label">文章标题</td>
    <td><input type="text" name="title" size="60" value="{#$detail.title#}"/>&nbsp;<font color="#FF0000">*</font></td>
  </tr>
  
  {#if $smarty.get.pid !=31 and $smarty.get.pid !=32 and $smarty.get.pid != 46#}
  {#if $smarty.get.pid !=1 and $smarty.get.pid !=21 and $smarty.get.pid !=22 and $smarty.get.pid !=25#}
  {#if $smarty.get.pid !=2 and $smarty.get.pid !=3 and $smarty.get.pid !=23 and $smarty.get.pid !=24 and $pcat.pid !=26#}
  {#if $pcat.pid !=24#}
<!--   <tr>
    <td class="label">地区:</td>
    <td>
		<select name="tid">
			{#foreach item=types_list from=$types#}
			<option value="{#$types_list.id#}" {#if $detail.tid==$types_list.id#} selected=""{#/if#}>{#$types_list.catename#}</option>
			{#/foreach#}
		</select>
    </td>
  </tr> -->
  {#/if#}
  {#/if#}
<!--   {#if $pcat.pid !=26 or $smarty.get.pid != 47#}
  <tr>
    <td class="label">年限:</td>
    <td>
		<select name="sid">
			{#foreach item=year_list from=$year#}
			<option value="{#$year_list.id#}" {#if $detail.sid==$year_list.id#} selected=""{#/if#}>{#$year_list.catename#}</option>
			{#/foreach#}
		</select>
    </td>
  </tr>
  {#/if#} -->
  {#/if#}
<!--   {#if $pcat.pid==26#}
  <tr>
    <td class="label">专题:</td>
    <td>
		<select name="zt">
			{#foreach item=zt_list from=$zt#}
			<option value="{#$zt_list.id#}" {#if $detail.zt==$zt_list.id#} selected=""{#/if#}>{#$zt_list.catename#}</option>
			{#/foreach#}
		</select>
    </td>
  </tr>

  {#/if#} -->
<!--  <tr>
    <td class="label">显示:</td>
    <td>
      <input type="radio" name="is_open" value="1" {#if $detail.is_open==1#} checked="checked" {#/if#}/>显示&nbsp;&nbsp;
      <input type="radio" name="is_open" value="0" {#if $detail.is_open==0#} checked="checked" {#/if#}/>隐藏
    </td>
  </tr>-->
  


  <tr>
    <td class="label">预览图<font color="#FF0000"></font></td>
    <td>
      {#if $detail.upfile != ""#}<img src="uploads/sm_article/{#$detail.upfile#}"/>{#else#}<img src="themes/index/images/nopic.gif"/>{#/if#}
    </td>
  </tr>
  <tr>
    <td class="label">上传文件和图片<font color="#FF0000"></font></td>
    <td>
      <input type="file" name="upfile"/>
    </td>
  </tr>

 {#if $smarty.get.id neq 1182#} 
  {#if $smarty.get.pid!=25 or $smarty.get.pid==62 or $smarty.get.pid==5 or $smarty.get.pid==84 or $smarty.get.pid==92 or $smarty.get.pid==94 or $smarty.get.pid==8 or $smarty.get.pid==73 or $smarty.get.pid==74 or $smarty.get.pid==70 or $smarty.get.pid==71 or $smarty.get.pid==77 or $smarty.get.pid==80#}
  <tr>
        <td class="label">摘要</td>
        <td><textarea name="short" cols="100" rows="8" style="width:300px;height:50px;">{#$detail.short#}</textarea></td>
  </tr>
  {#/if#} 
  <tr>
    <td class="label">日期<font color="#FF0000">(可选，不填为当前时间)</font></td>
    <td>
      <input id="d11" name="adddate" type="text" value="{#$detail.add_time|date_format:'%Y-%m-%d'#}" onClick="WdatePicker()"/>
    </td>
  </tr>

  <tr>
        <td class="label">文章内容</td>
        <td><textarea id="content" name="content" cols="100" rows="8" style="width:700px;height:300px;">{#$detail.content#}</textarea></td>
  </tr>
 <tr>
    <td class="label">关键字</td>
    <td><input type="text" name="keywords" maxlength="60" size="50" value="{#$detail.keywords#}"/><br/><span><font color="#999999">关键字为选填项，其目的在于方便外部搜索引擎搜索</font></span>
    </td>
  </tr>
  <tr>
    <td class="label">描述</td>
    <td><textarea  name="description" cols="60" rows="4">{#$detail.description#}</textarea></td>
  </tr>
  {#/if#}
   {#/if#}
  <tr>
    <td colspan="2" align="center"><br />
	  <input type="hidden" name="bid" value="{#$smarty.get.pid#}" />
	  <input type="hidden" name="pid" value="{#$smarty.get.pid#}" />
      <input type="hidden" name="cat_id" value="{#$detail.pid#}" />
      <input type="hidden" name="id" value="{#$detail.id#}" />
      <input type="submit" class="button" value="提交" />
      <input type="reset" class="button" value="重置" />
    </td>
  </tr>
</table>
</form>
</div>
{#include file="aj/pagefooter.html"#}